package simpleFacvtory;

public class Test {
    public static void main(String[] agrs){
        Train t1=(Train) TrafficFactory.made("火车");
        Car c1=(Car) TrafficFactory.made("汽车");
        t1.setGl(30000);t1.setZz(100);
        c1.setGl(1000);t1.setZz(5);
        t1.transform();
        c1.transform();

    }
}
